import java.io.*;
public class sumint {
    public static void main (String[] args) throws IOException {
        if (args.length<1) throw new RuntimeException ("not enough arguments");
        if (args.length>1) throw new RuntimeException ("not enough arguments");
        BufferedReader reader = new BufferedReader (new FileReader (new File (args[0])));
        String line;
        int sum = 0;
        while ((line = reader.readLine()) != null){
            try{
            sum = sum + Integer.parseInt(line);
            }catch (NumberFormatException e) {
            System.err.print("non numeric value in file");
            }  
        }
        System.out.println(sum);
     }
}